#ifndef INDEXLOADER_H
#define INDEXLOADER_H

#include <QString>
#include <QFile>
#include <QtXmlPatterns/QtXmlPatterns>
#include<RefrenceItem.h>

class IndexLoader
{
public:
    IndexLoader(const QString FileName);


    bool loadFile();

    void getFileNames(QList<RefItem>& fileNames);

    void getClassNames(QList<RefItem>& classNames);

    bool validFileRef(const QString refid) const;

    bool validClassRef(const QString refid) const;

private:
    QString m_fileName;

    QMap<QString,QString> m_fileMap;
    QMap<QString,QString> m_classMap;

    bool validate();
};

#endif // INDEXLOADER_H
